package com.xiaoke.web.service;

import com.xiaoke.entity.Admin;
import com.xiaoke.web.service.impl.AdminServiceImplBack;
import com.xiaoke.web.service.impl.BannerServiceFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@FeignClient(value = "service", fallback = AdminServiceImplBack.class)
public interface AdminService {
    @GetMapping("/admin/selectByPrimaryKey")
    Admin selectByPrimaryKey(@RequestParam("id") String id);

    @PostMapping("/admin/insert")
    void insert(@RequestBody Admin record);

    @PostMapping("/admin/update")
    void update(@RequestBody Admin record);

    @GetMapping("/admin/delete")
    void delete(@RequestParam("id") String id);

    @PostMapping("/admin/findByParams")
    List<Admin> findByParams(@RequestBody Map<String, Object> params);

}
